<template>
  <text :style="{ color: color, 'font-size': size + 'px' }" :class="['header-iconfont','icon-icon_'+icon]" @click="_onClick"></text>
</template>

<script>
  export default {
    name: 'UniIcons',
    props: {
      icon: { // icon
        type: String,
        default: '',
      },
      color: {
        type: String,
        default: '#333333'
      },
      size: {
        type: [Number, String],
        default: ''
      }
    },
    data() {
      return {}
    },
    methods: {
      _onClick() {
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss" scoped>
  @font-face {
    font-family: "headerIcon";
    src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALwAAsAAAAABsgAAAKiAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBKIEpATYCJAMMCwgABCAFhG0HPxv4BcgekiQVqpII0QigjACAeHhbI9+fmWMoEcRXAbsqisetRFS1QOpSiRLQNZ4d6b1cyzzw+NpVVQiKUKE83uRylJvclhyBL9tObcffC/kVsvUobFOLx/R/Lqc3gQ6k9S3LZa6BR70A44AC2hujLVwgAXmL7CJ+Jy35PIFW4/UobF1c32J1BZoWiENS2KxeCimKlW0WGlvWFnFZg+Z0JnUwl+T347ehqJM0ZGjutoMLHpv+1vStOx/Vlb0cESaomxuQMRdTiP2tqZ1KwqJKWlXl/uJGRUhLResaKQo1jQf94yWiEapsBzPVdOJbE+USfOveIIEMGsuZBZjVGtn/3hC94+KbQX53ekjcn7tf9Xt4W907tv317NStl0dS9WlZW+HulxUjn8ZpPXs9IT89Odre84Z8SpsVdCbfmdwJ8ZM+ty26uvDr/UsM7aFjx7tkd2mgutmef3yRt99VG/82yOoKFob6T3pO/5A3Fr//zd9YNr49cqBr7f/mVgFfn977JUP1n8LgmuZzuYN/Jwa2lFCKzLn4IiqKPdk4gCOhCmyvGvL1+pyuGQAnCM0l6QRd0+RM1mxqjhZyLjRosxQaNdsAreZY2tymj1YSpQWznSsQur1B0uk5ZN3e0UJ+QINBf9CoO0rQanv07dlmesjmFo02oQfOIUhXJZxYqZlUb6DYjWxdlErGDupMRmGwb6CaXcIE9RILsj0xRMSBaxXDonIZRpGCVKsAXerzidKp/n7edqM+V8WsaQsN2QjyAMchILmUBOedSbP2+Q1I2BWx6R7agHcH0jKydzCozwAAXVIlINqjXJPZIwwhhAOcpsTAouJAEU4pIG0fFUAu0sefkEhN6dfacaiqb3tN/H+7oBVqzpEiR9Hy6GnTsd0wLfJVjIwBAAA=') format('woff2'); /* iOS 4.1- */
  }

  .header-iconfont {
    font-family: "headerIcon" !important;
    font-size: 44upx;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .icon-icon_back:before {
    content: "\e607";
  }

  .icon-icon_home:before {
    content: "\e610";
  }

  .uni-icons {
    text-decoration: none;
    text-align: center;
  }
</style>
